import Vue from 'vue'
import VueRouter from 'vue-router'

const login = () => import('@/views/login/login')
const main = () => import('@/views/main/main')
const index = () => import('@/views/index/index')
Vue.use(VueRouter)

const routes = [
    {path: '/', redirect: '/login'},
    {path: '/login', component: login},
    {
        path: '/main', component: main, children: [
            {path:'/',component:index}
        ]
    }
]

const router = new VueRouter({
    routes
})

export default router
